﻿using System;
using Bpms.Log;

namespace Bpms.Cache
{
    /// <summary>
    /// 缓存日志
    /// </summary>
    public class CacheLogAdapter : LogAdapter
    {
        private log4net.ILog log;

        public override void WriteLog(string message)
        {
            WriteLog(message, (Exception)null);
        }

        public override void WriteLog(string message, Exception exception)
        {
            log = log4net.LogManager.GetLogger("Cache");
            if (log.IsInfoEnabled)
            {
                log.Info(message, exception);
            }
            log = null;
        }

    }
}
